package com.work.mb;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import com.work.util.Role;

/**
 * The Class RoleMB.
 *
 * @author "Mihai Roman"
 */
@ManagedBean(name = "roleMB")
@SessionScoped
public class RoleMB implements Serializable{

	private final static Logger LOG = Logger.getLogger(RoleMB.class.getName()); 
	
	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 7856012528093897514L;

	private List<Integer> roles;
	
	public RoleMB() {
		roles = new ArrayList<Integer>();
		readRoles();
	}

	private void readRoles() {
		roles.add(Role.ANALYST.getRole());
		roles.add(Role.DEVELOPER.getRole());
		roles.add(Role.GUEST.getRole());
		roles.add(Role.PM.getRole());
		roles.add(Role.SCRUM_MASTER.getRole());
		roles.add(Role.TEAM_LEAD.getRole());
		roles.add(Role.ADMIN.getRole());
	}
	
	public List<Integer> getRoles() {
		return roles;
	}
}
